<div class="row block">

    <div class="panel panel-primary">

        <div class="panel-heading">
            <span class="panel-controls">
                <button class="btn btn-primary" uib-tooltip="刷新" ng-click="region.reload()" ><i class="fa fa-refresh fa-fw" ng-class="{'fa-spin':!region.loadover}" ></i></button>
                <button class="btn btn-primary" uib-tooltip="保存" ng-click="region.save()"><i class="fa fa-floppy-o" aria-hidden="true"></i></button>
                <button class="btn btn-primary" uib-tooltip="关闭" ng-click="region.cancel()"><i class="fa fa-times" aria-hidden="true"></i></button>
            </span>
            <h5> {{ region.nodeStr }}</h5>
        </div>

        <div class="panel-body">
            <div class="pt20">
                <table ng-table="region.proxylistTable" class="table table-hover text-center table-condensed">
                    <tr ng-repeat="m in $data">
                        <td data-title="'ID'">{{m.id}}</td>
                        <td data-title="'选择'"><input type="checkbox" ng-model="m.selected"> </td>
                        <td data-title="'区域'"><font size="5">{{m.name}}</font></td>
                        <td data-title="'删除'">
                            <button class="btn btn-effect-ripple btn-xs btn-danger ng-scope" ng-if="m.projectid == region.treeid" uib-tooltip="删除区域" ng-click="region.deleteRegion( m.id )"><i class="fa fa-trash"></i></button></td>
                    </tr>
                    <tr>
                        <td colspan="5" style="text-align:left;" > 
                             <a ng-if="!region.showRegionBool" ng-click="region.showRegion(1)"  ><font size="5">+自定义一个区域</font></a>

                           <div ng-if="region.showRegionBool" >
                               <div class="col-md-8">
                                   <input class="form-control" ng-model="region.regionText" placeholder="新区域"/>
                              </div>
                              <button class="btn btn-primary" ng-if="region.regionText" uib-tooltip="保存" ng-click="region.createRegion()">保存</button>
                              <button class="btn btn-warning" uib-tooltip="取消" ng-click="region.showRegion(0)">取消</button>
                          </div>
                       </td>
                     </tr>
                </table>
            </div>
        </div>

    </div>

</div>

